-- CALC_SCROLL_BAG_BONUS

-- 宝箱卷轴包奖励
-- @param user     玩家对象
return function(user)
    local ret    = {};
    local rand1  = DungeonM.getRandSeed("CALC_SCROLL_BAG_BONUS");
    local rand2  = DungeonM.getRandSeed("CALC_SCROLL_BAG_BONUS");
    local rand3  = DungeonM.getRandSeed("CALC_SCROLL_BAG_BONUS");

    -- 2个随机3阶卷轴
    local fetchArr = ItemM.getScrollByRank(3);
    local classId  = FormulaM.invoke("FETCH_BY_RAND", fetchArr, rand1);
    local amount = 2;
    table.insert(ret, {1, classId, amount});
    
    -- 1个随机4阶卷轴
    fetchArr = ItemM.getScrollByRank(4);
    classId  = FormulaM.invoke("FETCH_BY_RAND", fetchArr, rand2);
    amount = 1;
    table.insert(ret, {1, classId, amount});
    
    -- 1个随机5阶卷轴
    fetchArr = ItemM.getScrollByRank(5);
    classId  = FormulaM.invoke("FETCH_BY_RAND", fetchArr, rand3);
    amount = 1;
    table.insert(ret, {1, classId, amount});

    return ret;
end
